package com.hzw.net.net.resource

/**
 *
 * @Author:         HuaZhongWei
 * @CreateDate:     2020/4/15 14:03
 *
 * @Description:    请求数据模板
 *
 */
data class Resource<T>(
    val code: Int,
    val message: String,
    val data: T
) : IResource<T> {

    override fun code() = code

    override fun message() = message

    override fun data() = data

    override fun isSuccess() = code == 0
}